<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            /*float: left;*/
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            vertical-align: bottom;
            box-sizing: border-box;
            width: 5.9em;
            height: 5.2em;
            margin: .6em;
            background: #fb3;
            /*box-shadow: .1em .1em .3em rgba(0, 0, 0, .5);*/
            filter: drop-shadow(.1em .1em .1em rgba(0,0,0,.5));
            font: 200%/1.6 Baskerville, Palatino, serif;
            text-align: center;
        }

        .speech {
            border-radius: .3em;
        }
        .speech::before {
            content: '';
            position: absolute;
            top: 1em;
            right: -.7em;
            width: 0;
            height: 0;
            border: 1em solid transparent;
            border-left-color: #fb3;
            border-right-width: 0;
        }

        .dotted {
            background: transparent;
            border: .3em dotted #fb3;
        }

        .cutout {
            border: .5em solid #58a;
            border-image: 1 url('data:image/svg+xml,\
                                <svg xmlns="http://www.w3.org/2000/svg"\
                                width="3" height="3" fill="%23fb3">\
                                <polygon points="0,1 1,0 2,0 3,1 3,2 2,3 1,3 0,2"/>\
                        </svg>');
            background-clip: padding-box;
        }

    </style>
</head>
<body>
    <div class="speech">Speech bubble</div>
    <div class="dotted">Dotted border</div>
    <div class="cutout">Cutout corners</div>
</body>
</html>